﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;

namespace CMS.Model
{
    /// <summary>
    /// Use to accept search condition data from UI Layer
    /// Author:Fiona Pan
    /// </summary>
    [DataContract]
    public class Condition
    {
        [DataMember]
        private string _courseName;
        [DataMember]
        private int _courseStatus;
        [DataMember]
        private string _teacherName;
        [DataMember]
        private string _levelName;
        /// <summary>
        /// order direction
        /// </summary>
        [DataMember]
        private string _orderDirection;
        /// <summary>
        /// sort condition
        /// </summary>
        [DataMember]
        private string _sortExpression;

        public Condition()
        {

        }
        /// <summary>
        /// Initiate Condition with parameter
        /// </summary>
        /// <param name="courseName">CourseName</param>
        /// <param name="courseStatus">CourseStatus</param>
        /// <param name="teacherName">TeacherName</param>
        /// <param name="levelName">LevelName</param>
        public Condition(string courseName,int courseStatus,string teacherName,string levelName)
        {
            _courseName=courseName;
            _courseStatus=courseStatus;
            _teacherName=teacherName;
            _levelName=levelName;
        }
        public string CourseName
        {
            get { return _courseName; }
            set { _courseName = value; }
        }


        public int CourseStatus
        {
            get { return _courseStatus; }
            set { _courseStatus = value; }
        }

        public string TeacherName
        {
            get { return _teacherName; }
            set { _teacherName = value; }
        }

        public string LevelName
        {
            get { return _levelName; }
            set { _levelName = value; }
        }

        public string OrderDirection
        {
            get { return _orderDirection; }
            set { _orderDirection = value; }
        }

        public string SortExpression
        {
            get { return _sortExpression; }
            set { _sortExpression = value; }
        }

    }
}
